<tpl> if $category_array[0].class_id neq '' </tpl>
	<div style="margin-bottom:10px">
	<form action="shopproductcate.manage.php" id="form_del" name="form_del" method="post">
		<input type="hidden" name="action" id="action"/>
		<table class="from_table2_one top-1">	
			<thead>
				<tr class="area_ajax_list_title">
					<th class="pd-left"><tpl> $langSysShopproductDel </tpl></th>
					<th><tpl> $langSysBabyClassName </tpl></th>
					<th><tpl> $langSysShopProCateParentClass </tpl></th>
					<th><tpl> $langSysShopProCatePic </tpl></th>
					<th><tpl> $langSysShopProCateOpen </tpl></th>
					<th><tpl> $langSysShopProCateSort </tpl></th>
				</tr>
			</thead>
			<tpl> section name=i loop=$category_array </tpl>
				<input type="hidden" name="class_id[<tpl> $category_array[i].class_id </tpl>]" value="<tpl> $category_array[i].class_id </tpl>" />
				<tr>
					<td class="pd-left-1" align="left"><input type="checkbox" name="del_id[<tpl> $category_array[i].class_id </tpl>]"  value="<tpl> $category_array[i].class_id </tpl>"/></td>
					<td align="left">
						<input name="class_name[<tpl> $category_array[i].class_id </tpl>]" type="text" maxlength="80" value="<tpl> $category_array[i].class_name </tpl>" style="border:1px solid #ccc"/>
					</td>
					<td align="left">
						<select name="class_parent_id[<tpl> $category_array[i].class_id </tpl>]">
							<option value="0"><tpl> $langSysShopProCateRootClass </tpl></option>
							<tpl> section name=loop loop=$sel_class </tpl>
								<tpl> if $category_array[i].class_id neq $sel_class[loop].class_id </tpl>
								<option value="<tpl> $sel_class[loop].class_id </tpl>"><tpl> $sel_class[loop].class_name </tpl></option>
								<tpl> /if </tpl>
							<tpl> /section </tpl>
						</select>
					</td>
					<td align="left">
						<input type="text" name="class_pic[<tpl> $category_array[i].class_id </tpl>]" value="<tpl> $category_array[i].class_pic </tpl>" style="border:1px solid #ccc" />
						<tpl> if $category_array[i].class_pic neq '' </tpl>
						<a title="<tpl> $langSysShopProCateViewPic </tpl>" href="<tpl> $category_array[i].class_pic </tpl>" target="_blank"><tpl> $langSysShopProCateViewPic </tpl></a>
						<tpl> /if </tpl>
					</td>
					<td align="left">
						<tpl> if $category_array[i].class_parent_id eq '0' </tpl>
							<input type="checkbox" <tpl> if $category_array[i].class_if_open eq '0' </tpl>checked="checked"<tpl> /if </tpl> name="class_if_open[<tpl> $category_array[i].class_id </tpl>]" value="0" title="<tpl> $langSysShopProCateOpen </tpl>" />
						<tpl> /if </tpl>
					</td>
					<td align="left">
						<input size="5" type="text" name="class_sort[<tpl> $category_array[i].class_id </tpl>]" value="<tpl> $category_array[i].class_sort </tpl>" style="border:1px solid #ccc" />
					</td>
				</tr>
				<tpl> if $category_array[i].child neq '' </tpl>
				<tpl> foreach from=$category_array[i].child item=one </tpl>
				<input type="hidden" name="class_id[<tpl> $one.class_id </tpl>]" value="<tpl> $one.class_id </tpl>" />
				<tr>
					<td class="pd-left-1" align="left"><input type="checkbox" name="del_id[<tpl> $one.class_id </tpl>]"  value="<tpl> $one.class_id </tpl>" /></td>
					<td align="left">
						|--<input name="class_name[<tpl> $one.class_id </tpl>]" type="text" maxlength="80" value="<tpl> $one.class_name </tpl>" style="border:1px solid #ccc"/>
					</td>
					<td align="left">
						<select name="class_parent_id[<tpl> $one.class_id </tpl>]">
							<option value="0"><tpl> $langSysShopProCateRootClass </tpl></option>
							<tpl> section name=loop loop=$sel_class </tpl>
								<option <tpl> if $one.class_parent_id eq $sel_class[loop].class_id </tpl>selected="selected"<tpl> /if </tpl> value="<tpl> $sel_class[loop].class_id </tpl>"><tpl> $sel_class[loop].class_name </tpl></option>
							<tpl> /section </tpl>
						</select>
					</td>
					<td align="left">
						<input type="text" name="class_pic[<tpl> $one.class_id </tpl>]" value="<tpl> $one.class_pic </tpl>"  style="border:1px solid #ccc" />
						<tpl> if $one.class_pic neq '' </tpl>
						<a title="<tpl> $langSysShopProCateViewPic </tpl>" href="<tpl> $one.class_pic </tpl>" target="_blank"><tpl> $langSysShopProCateViewPic </tpl></a>
						<tpl> /if </tpl>
					</td>
					<td align="left"></td>
					<td align="left">
						<input size="5" type="text" name="class_sort[<tpl> $one.class_id </tpl>]" value="<tpl> $one.class_sort </tpl>"  style="border:1px solid #ccc" />
					</td>
				</tr>
				<tpl> /foreach </tpl>
				<tpl> /if </tpl>
			<tpl> /section </tpl>
			
		</table>
	</form>
	</div>
	<div class="table-5-bottom"><div class="p-left"><span class="btn_left"><input class="btn_submit" name="update" type="button" id="update" value="<tpl> $langSysShopProCateSave </tpl>" /></span>
					<span class="btn_left"><input class="btn_submit" name="selectall" type="button" id="selectall" value="<tpl> $langSysShopAllSelect </tpl>" /></span>
					<span class="btn_left"><input class="btn_submit" name="negative" type="button" id="negative" value="<tpl> $langSysShopContrarySelect </tpl>" /></span>
					<span class="btn_left"><input class="btn_submit"  type="button" id="delbutton" name="delbutton" value="<tpl> $langSysShopDel </tpl>" /></span>
					<span class="btn_left"><input class="btn_submit" name="return" type="button" id="return" value="<tpl> $langSysShopProCateReturn </tpl>" /></span></div></div>
<tpl> else </tpl>
<table width="100%" border="0" cellpadding="0" cellspacing="1" >
	<tr>
		<td height="30" colspan="3" align="center" valign="middle"><tpl> $langCNull </tpl></td>
	</tr>
	<tr>
		<td colspan="3"><span class="btn_left"><input class="btn_submit" name="return" type="button" id="return" value="<tpl> $langSysShopProCateReturn </tpl>" /></span></td>
	</tr>
</table>
<tpl> /if </tpl>

<div id="ui_question" style="display:none; cursor: default; padding:10px"> 
        <b style=" font-size:14px; margin-top:10px; line-height:50px; height:50px;padding-top:10px; padding-bottom:10px"><tpl> $langCConfirmDelete </tpl></b> <br />
        <input type="button" id="yes" value="<tpl> $langCYes </tpl>"  style=" border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/> 
        <input type="button" id="no" value="<tpl> $langCNo </tpl>"  style="border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/>
</div> 
<script>
var ui_question = $("#ui_question")[0];
$(document).ready(function(){
	$('#negative').click(
		function(){
			$('#form_del input[@type=checkbox]').each(function(){
				$(this).attr('checked',!$(this).attr('checked'))
			})
		}
	);
	$('#selectall').click(
		function(){
			$('#form_del input[@type=checkbox]').each(function(){
				$(this).attr('checked',true)
			})
		}
	);
	$('#return').click(
		function(){
			ShowDiv='result_content';
			getPageContent('shopproductcate.manage.php?action=ajax_list');
		}
	);
	$('#update').click(
		function(){
			$('#action').val('update');
			$('#form_del').ajaxSubmit(options_del);
		}
	);
	
	//删除操作
	var options_del = {
		beforeSubmit:  function(){showLoading(showText);},
		success:       function(msg){
						hideLoading();
						showMessage(msg.message,msg.type);
						if(msg.type == '1'){
							ShowDiv = "result_content";
							getPageContent("shopproductcate.manage.php?action=ajax_list");
						}
					},
		type:      'post',
		dataType:  'json'
	};
	
	$("#delbutton").click(function(){
		$.blockUI(ui_question, { width: '275px' });
	});
	
	$('#yes').click(function() {
		$.unblockUI();
		$('#action').val('del');
		$('#form_del').ajaxSubmit(options_del);			
		return false;
	}); 
	$('#no').click($.unblockUI); 
	
});
</script>	